#ifndef RT_CONFIG_H__
#define RT_CONFIG_H__

#include <rtconfig_project.h>

/* RT-Thread basic configuration */
#define RT_NAME_MAX 8
#define RT_ALIGN_SIZE 4
#define RT_THREAD_PRIORITY_MAX 32
#define RT_TICK_PER_SECOND 1000
#define RT_DEBUG
#define RT_DEBUG_COLOR
#define RT_DEBUG_INIT 0
#define RT_USING_OVERFLOW_CHECK

/* Inter-Thread communication */
#define RT_USING_SEMAPHORE
#define RT_USING_MUTEX
#define RT_USING_EVENT
#define RT_USING_MAILBOX
#define RT_USING_MESSAGEQUEUE

/* Memory Management */
#define RT_USING_MEMPOOL
#define RT_USING_SMALL_MEM
#define RT_USING_HEAP

/* Kernel Device Object */
#define RT_USING_DEVICE
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "uart1"

/* RT-Thread components */
#define RT_USING_COMPONENTS_INIT
#define RT_USING_USER_MAIN
#define RT_MAIN_THREAD_STACK_SIZE 2048
#define RT_MAIN_THREAD_PRIORITY 10

/* C++ features */
#define RT_USING_CPLUSPLUS

/* Device drivers */
#define RT_USING_DEVICE_IPC
#define RT_USING_SERIAL
#define RT_USING_I2C
#define RT_USING_PIN
#define RT_USING_ADC
#define RT_USING_PWM
#define RT_USING_SPI
#define RT_USING_WDT

/* Hardware drivers config */
#define BSP_USING_UART1
#define BSP_USING_I2C1
#define BSP_USING_SPI1
#define BSP_USING_ADC1

/* Modbus stack */
#define PKG_USING_MODBUS
#define MODBUS_SLAVE_SUPPORT
#define MODBUS_MASTER_SUPPORT

#endif